<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

    <title>我的挂号记录</title>

    <link rel="shortcut icon" href="assets/img/logo2x.png"/>
    <!-- Bootstrap core CSS -->
    <link href="assets/css/bootstrap.css" rel="stylesheet"/>
    <!--external css-->
    <link rel="stylesheet" type="text/css" href="assets/font-awesome/css/font-awesome.css"/>
    <link rel="stylesheet" type="text/css" href="assets/css/zabuto_calendar.css">
    <link rel="stylesheet" type="text/css" href="assets/js/gritter/css/jquery.gritter.css"/>
    <link rel="stylesheet" type="text/css" href="assets/lineicons/style.css">

    <!-- Custom styles for this template -->
    <link href="assets/css/style.css" rel="stylesheet">
    <link href="assets/css/style-responsive.css" rel="stylesheet">

    <script src="assets/js/chart-master/Chart.js"></script>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>

<section id="container">

    <div th:replace="tools :: header"></div>

    <div th:replace="tools :: sidebar "></div>

    <!-- **********************************************************************************************************************************************************
    MAIN CONTENT
    *********************************************************************************************************************************************************** -->
    <!--main content start-->
    <section id="main-content">
        <section class="wrapper site-min-height">
            <div class="form-panel">
                <div class="btn-group">
                    <button class="btn " onclick="window.history.back()"><i class="fa fa-angle-left"></i> 返回</button>
                    <button class="btn " onclick="javascript:location.reload();"><i class="fa fa-refresh"></i> 刷新
                    </button>
                    <button class="btn btn-default" onclick="location.href='/appointment'">前往挂号</button>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12 ">
                    <div class="form-panel">
                        <h3 class="text-center"><i class="fa fa-angle-right"></i> 记录查询 <i class="fa fa-angle-left"></i> </h3>
                        <hr>
                        <table id="table" class="table table-striped table-advance table-hover">

                            <thead>
                            <tr class="bg-success">
                                <th> 挂号单号 </th>
                                <th> 挂号人 </th>
                                <th> 患者</th>
                                <th> 挂号科室 </th>
                                <th> 医生 </th>
                                <th> 挂号时间 </th>
                                <th> 预约时间 </th>
                                <th> 状态 </th>
                                <th> 费用 </th>
                                <th> 备注 </th>
                                <th> 操作 </th>
                            </tr>
                            </thead>

                            <tbody>
                            <tr th:each="record : ${records}" id="records">
                                <td>
                                    <a th:href="'/viewrecord?rbid='+${record.regbillid}" th:text="${record.regbillid}"></a>
                                </td>
                                <td th:text="${record.userinfo.realname}"></td>
                                <td th:text="${record.ptinfo.realname}"></td>
                                <td th:text="${record.doctor.dept.dname}"></td>
                                <td th:text="${record.doctor.drinfo.realname}"></td>
                                <td th:text="${record.createtime}"></td>
                                <td th:text="${record.aptdate}"></td>
                                <td th:text="${record.state}"></td>
                                <td th:text="${record.total}"></td>
                                <td th:text="${record.extra}"></td>
                                <td>
                                    <a th:if="${record.state} == '已失效'" th:href="'/delrecord?rbid='+${record.regbillid}"> 删除 </a>
                                </td>
                            </tr>

                            </tbody>
                        </table>
                        <!--<div class="inline-block form-inline">-->
                            <!--<button class="btn" onclick="switchPage('pre')"> 上一页</button>-->
                                <!--<button class="btn" onclick="switchPage('nxt')"> 下一页</button>-->
                            <!--<button class="btn" onclick="switchPage('goto')">前往</button>-->
                            <!--<input class="form-control" placeholder="页码" type="number">-->
                            <!--第 <span class="cpspan">1</span> 页-->
                            <!--共 <span>3</span>页-->
                            <!--<input hidden="" id="cpage" value="1">-->
                        <!--</div>-->
                    </div><!-- /content-panel -->
                </div><!-- /col-md-12 -->
            </div>

        </section>
        <! --/wrapper -->

    </section>

    <!--main content end-->

    <!--**********************************************************************************************
    Footer
    **********************************************************************************************-->

    <!--footer start-->
    <footer class="site-footer">
        <div class="text-center">
            Copyright © 2018 David Bai
            <a href="#main-content" class="go-top">
                <i class="fa fa-angle-up"></i>
            </a>
        </div>
    </footer>
    <!--footer end-->
</section>


<!-- js placed at the end of the document so the pages load faster -->
<script src="assets/js/jquery.js"></script>
<script src="assets/js/jquery-1.8.3.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script class="include" type="text/javascript" src="assets/js/jquery.dcjqaccordion.2.7.js"></script>
<script src="assets/js/jquery.scrollTo.min.js"></script>
<script src="assets/js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="assets/js/jquery.sparkline.js"></script>

<!--common script for all pages-->
<script src="assets/js/common-scripts.js"></script>


</body>
</html>
